home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Celestin Apprentice 5
/
Apprentice-Release5.iso
/
Source Code
/
Libraries
/
CW GUSI 1.6.4
/
Examples
/
GUSIPAPTest.c
< prev
next >
Wrap
C/C++ Source or Header
|
1995-01-23
|
1KB
|
51 lines
/*********************************************************************
File : GUSI - Grand Unified Socket Interface
File : GUSIPAPTest - Test PAP sockets
Author : Matthias Neeracher <neeri@iis.ethz.ch>
Language : MPW C
$Log: GUSIPAPTest.c,v $
Revision 1.2 1994/12/31 01:06:30 neeri
ANSIfy (omitting parameter names was illegal).
Revision 1.1 1994/02/25 02:47:26 neeri
Initial revision
*********************************************************************/
#include <GUSI.h>
#include "GUSITest.h"
#include <stdio.h>
#include <fcntl.h>
#include <stdlib.h>
#include <errno.h>
#include <string.h>
#include "Events.h"
extern int GUSIDefaultSpin(spin_msg, long);
void Open(char ch1, char ch2, const char * line)
{
sock = open("Dev:Printer", O_RDWR);
if (sock == -1) {
printf("# open() returned error %s\n", Explain());
Where();
}
}
main(int argc, char ** argv)
{
GUSISetup(GUSIwithSIOUXSockets);
GUSISetup(GUSIwithPAPSockets);
printf("GUSIPAPTest MN 15Feb93\n\n");
COMMAND('o', 'p', Open, "", "Open connection to printer");
AddSocketCommands();
RunTest(argc, argv);
CleanupSockets();
}